home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / hypercrd / hc2_x / tcprogud.sit / TC Prog Guide / card_62300.txt < prev    next >
Text File  |  1991-02-27  |  3KB  |  107 lines

  1. -- card: 62300 from stack: in
  2. -- bmap block id: 0
  3. -- flags: 0000
  4. -- background id: 4755
  5. -- name: 
  6.  
  7.  
  8. -- part 1 (field)
  9. -- low flags: 00
  10. -- high flags: 0007
  11. -- rect: left=30 top=78 right=296 bottom=478
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 0 / 0
  14. -- text alignment: 0
  15. -- font id: 4
  16. -- text size: 9
  17. -- style flags: 0
  18. -- line height: 12
  19. -- part name: 
  20.  
  21.  
  22. -- part 2 (button)
  23. -- low flags: 00
  24. -- high flags: 0001
  25. -- rect: left=13 top=29 right=57 bottom=351
  26. -- title width / last selected line: 0
  27. -- icon id / first selected line: 0 / 0
  28. -- text alignment: 1
  29. -- font id: 0
  30. -- text size: 12
  31. -- style flags: 0
  32. -- line height: 16
  33. -- part name: New Button
  34.  
  35.  
  36. -- part contents for background part 4
  37. ----- text -----
  38. File 1 of 2 demonstrating a suggested TC root class:
  39.  
  40. -- part contents for card part 1
  41. ----- text -----
  42. /*
  43. *   FILE:    class.h
  44. *   AUTHOR:  R.G.
  45. *   CREATED: August 4, 1990
  46. *   
  47. *   Defines Generic_Class root class and declares alternate
  48. *   object allocation/deallocation functions.
  49. */
  50.  
  51. # define   _H_class
  52. # define   INDIRECT
  53. /*  Means Think C will use handles for objects and move object memory
  54. *   occasionally.  If there are many objects, undefining this may
  55. *   speed things up.
  56. */
  57.  
  58. # define   TRUE   1
  59. # define   FALSE  0
  60. typedef int boolean;
  61.  
  62. /******************************************************************
  63. *   abstract Generic_Class definition
  64. ******************************************************************/
  65. # ifdef   INDIRECT
  66. struct    Generic_Class:indirect
  67. # else
  68. struct    Generic_Class:direct
  69. # endif
  70. {
  71.     boolean   init(void);
  72.     boolean   destroy(void);
  73. };
  74.  
  75. /******************************************************************
  76. *   Function to simulate automated initialization.
  77. *
  78. *   This function does not work with C++, as discussed in the
  79. *   source file.  Instead a macro may be used in conjunction with
  80. *   a simpler function cond_init():
  81. *
  82. *       # define  new_init(cclass)  cond_init(new(cclass))
  83. *
  84. *   Here, cond_init() should accept a newly-created object as its
  85. *   argument and return either the successfully initialized object
  86. *   or NULL.
  87. ******************************************************************/
  88. void   *new_init(void*);
  89.  
  90. /******************************************************************
  91. *   Function to simulate automated deallocation.
  92. ******************************************************************/
  93. void   destroy_delete(Generic_Class*);
  94.  
  95.  
  96.  
  97. -- part contents for background part 7
  98. ----- text -----
  99. 210
  100.  
  101. -- part contents for background part 6
  102. ----- text -----
  103. Root class for TC using automated constructors/destructors
  104.  
  105. -- part contents for background part 17
  106. ----- text -----
  107. p3